package com.shop.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * 订单商品 实体类。
 *
 * @author 彭新才
 * @since 2024-10-14
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "订单商品")
@Table(value = "shop_order_product")
public class ShopOrderProduct implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @Id(keyType = KeyType.Auto)
    @Schema(description = "主键id")
    private Long id;

    /**
     * 商品id
     */
    @Schema(description = "商品id")
    private Long productId;

    /**
     * 商品名称
     */
    @Schema(description = "商品名称")
    private String productName;

    /**
     * 商品sku id
     */
    @Schema(description = "商品sku id")
    private String skuId;

    /**
     * 商品模板id
     */
    @Schema(description = "商品模板id")
    private Long templateId;

    /**
     * 商品详情
     */
    @Schema(description = "商品详情")
    private String content;

    /**
     * 商品编码
     */
    @Schema(description = "商品编码")
    private String productNo;

    /**
     * 商品价格(单价)
     */
    @Schema(description = "商品价格(单价)")
    private BigDecimal productPrice;

    /**
     * 商品划线价
     */
    @Schema(description = "商品划线价")
    private BigDecimal linePrice;

    /**
     * 商品重量(Kg)
     */
    @Schema(description = "商品重量(Kg)")
    private Double productWeight;

    /**
     * 积分金额
     */
    @Schema(description = "积分金额")
    private BigDecimal pointsMoney;

    /**
     * 积分抵扣数量
     */
    @Schema(description = "积分抵扣数量")
    private Long pointsNum;

    /**
     * 赠送的积分数量
     */
    @Schema(description = "赠送的积分数量")
    private Long pointsBonus;

    /**
     * 购买数量
     */
    @Schema(description = "购买数量")
    private Long totalNum;

    /**
     * 商品总价(数量×单价)
     */
    @Schema(description = "商品总价(数量×单价)")
    private BigDecimal totalPrice;

    /**
     * 实际付款价(折扣和优惠后)
     */
    @Schema(description = "实际付款价(折扣和优惠后)")
    private BigDecimal totalPayPrice;

    /**
     * 供应商金额
     */
    @Schema(description = "供应商金额")
    private BigDecimal supplierMoney;

    /**
     * 平台结算金额
     */
    @Schema(description = "平台结算金额")
    private BigDecimal sysMoney;

    /**
     * 订单id
     */
    @Schema(description = "订单id")
    private Long orderId;

    /**
     * 用户id
     */
    @Schema(description = "用户id")
    private Long userId;

    /**
     * 虚拟物品内容
     */
    @Schema(description = "虚拟物品内容")
    private String virtualContent;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Timestamp createTime;

}
